<?php
namespace App\Http\Controllers;

use App\Services\Check;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;

class NotifyController
{

    function pay(Request $request){
        $content=$request->getContent();
        Log::info($content);
        try{
            Check::payNotify(json_decode($content,true)) ;
            return 'success';
        }catch (\Exception $e){
            Log::error("支付回调出错:{$e->getMessage()} {$e->getFile()} {$e->getLine()}");
        }
        return 'fail';
    }
}
